<wxs module="dateFr" src="../../js/filter.wxs"></wxs>
<import src="../detail/detail" />
<template is="{{template}}" data="{{my_toast_tip: my_toast_tip}}" />
<view id='nscanPage'>
	<image class='bgStyle' src="{{urlAddress1}}/newSanBg.png" /> 
	<!-- <label class="animationView"></label> -->
    <view bindtap='turnWrite' wx:if="{{!isWrite}}" class="scanImg_style">
        <image src="{{urlAddress1}}/saoma_icon_shuru.png" /> <label class="scanTit_style">手动输入</label>
    </view>
     <view wx:if="{{isWrite}}" class="writeView">
        <input  placeholder="请输入条码" type="number" bindinput="CodeInput" value="{{inputCode}}" /> 
        <span wx:if="{{inputCode}}" class="World" bindtap="makeSure">确认</span>
        <span wx:else class="noWorld" >确认</span>
    </view>
    <image class='angleStyle angleStyle1' src="{{urlAddress1}}/nscan_Angle1.png" />
    <image class='angleStyle angleStyle2' src="{{urlAddress1}}/nscan_Angle2.png" />
    <image class='angleStyle angleStyle3' src="{{urlAddress1}}/nscan_Angle3.png" />
    <image class='angleStyle angleStyle4' src="{{urlAddress1}}/nscan_Angle4.png" />
    <camera device-position="back" mode='scanCode' flash="off" binderror="error"  bindscancode='scanAtion'>
    <label class="animationView"></label> 
    </camera>
    <label class="note">扫描条码添加至购物车</label>
   

    <view class='payView'>
    	<label class="pay_left">
    		<image src="{{urlAddress1}}/newScanShopMarket.png" />
    		<p>{{obj.num}}</p>
    		<span wx:if='{{obj.promotionPrice}}'>¥{{dateFr.getNum(obj.promotionPrice)}}</span>
    		
            <span class="originalPrice" wx:if="{{obj.promotionPrice!=obj.originalPrice}}">{{dateFr.getNum(obj.originalPrice)}}<view class="line"></view></span>
           
    	</label>
    	<label wx:if="{{obj.num==0}}" class="pay_right1">去结算</label>
    	<label  wx:else class="pay_right2" bindtap="submitAction">去结算</label>
    </view>

   
    <view id="goods" class='{{goodsClass}}' wx:if='{{obj.cartItems.length}}'>
    <view class='goodstop'>
    	<label>已选商品</label>
    	<label bindtap="cleanAll"><image src="{{urlAddress1}}/saomaClear.png" />清空</label>
    	
    </view>
    <scroll-view class='scrollView' scroll-y > 
        <view  class="goods_style" wx:for="{{obj.cartItems}}" wx:key="{{index}}"  bindlongtap="longTap" bindtouchstart="touchStart" bindtouchend="touchEnd" data-code="{{item.goods.goodsCode}}" data-name="{{item.goods.goodsName}}">
            <view class="good_msg">
                <label wx:if='{{item.promotionType!=7&&item.promotionType!=9}}' class="name1">
                <p>{{item.goods.goodsName}}</p>
                </label>
                <label class="name2" wx:if='{{item.promotionType==7||item.promotionType==9}}'>
                 	<p>{{item.goods.goodsName}}</p>
                    <span wx:if='{{item.promotionType==7}}' class="type1">{{item.promotionAlias}}</span> 
                    <span wx:if='{{item.promotionType==9}}' class="type2">{{item.promotionAlias}}</span>
                </label>
                <label class="money">
                    <label class="price">
                    	 <span class="originalPrice" wx:if="{{item.goods.price!=item.goods.originalPrice&item.goods.promotionType!=7}}">{{dateFr.getNum(item.goods.originalPrice)}} <view class="line"></view></span>
                        ¥{{dateFr.getNum(item.goods.price)}}
                    </label>
                </label>
                <view class="add_sub_style">
                    <label data-code="{{item.goods.goodsGbk}}" bindtap="addAction">
                        <image src="{{urlAddress}}/waimai_btn_minus.png" />
                    </label>
                    <label><p>{{item.num}}</p></label>
                    <label data-code="{{item.goods.goodsGbk}}" bindtap="subAction">
                        <image src="{{urlAddress}}/waimai_btn_add.png" />
                    </label>
                </view>
            </view>
          
           <!--  <view class="activity" wx:if="{{item.promotionType==7||item.promotionType==9}}">
                <label></label>
                <span wx:if="{{item.promotionType==7}}" class="promotions">{{item.promotionAlias}}</span>
                <span wx:if="{{item.promotionType==9}}" class="assemblage"><span>组</span>{{item.promotionAlias}}</span>
            </view> -->
        </view>
    </scroll-view>
    </view>
</view>

